View Javadoc
1 /* 2 * Title: S/MIME Project 3 * Description: S/MIME email sending capabilities 4 * @Author Vladimir Radisic 5 * @Version 2.0.1 6 */ 7 8 9 package org.webdocwf.util.smime.der; 10 11 12 import org.webdocwf.util.smime.exception.SMIMEException; 13 import org.webdocwf.util.smime.exception.ErrorStorage; 14 15 16 /*** 17 * DERPrintableString is primitive type of DER encoded object for one of 18 * different forms for representing character string type in ASN.1 notation. 19 */ 20 public class DERPrintableString extends DERObject { 21 22 /*** 23 * Constructs DERPrintableString object with characters defined in the given 24 * String 25 * @param s0 content of DERPrintableString 26 * @exception SMIMEException thrown in super class constructor. 27 */ 28 public DERPrintableString(String s0) throws SMIMEException { 29 super(19); 30 byte[] temp = null; 31 32 try { 33 temp = s0.getBytes("ISO-8859-1"); 34 } catch (Exception e) { 35 throw SMIMEException.getInstance(this, e, "constructor"); 36 } 37 this.addContent(temp); 38 } 39 40 /*** 41 * Constructs DERPrintableString object with characters defined in the given 42 * byte array 43 * @param b0 content of DERPrintableString 44 * @exception SMIMEException thrown in super class constructor. 45 */ 46 public DERPrintableString(byte[] b0) throws SMIMEException { 47 super(19); 48 this.addContent(b0); 49 } 50 } 51

This page was automatically generated by Maven